package com.neusoft.work.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@TableName("RoomInfo")
public class RoomInfo {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String building;
    private Integer floor;
    private String roomNumber;
    private Integer usageType;
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public String getBuilding() {
        return building;
    }
    public void setBuilding(String building) {
        this.building = building;
    }
    public String getRoomNumber() {
        return roomNumber;
    }
    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }
    public Integer getUsageType() {
        return usageType;
    }
    public void setUsageType(Integer usageType) {
        this.usageType = usageType;
    }
    public Integer getFloor() {return this.floor;}
    public void setFloor(Integer floor) {this.floor = floor;}
    
    // 根据usageType获取房间类型名称
    public String getRoomTypeName() {
        if (usageType == null) return "普通房间";
        switch (usageType) {
            case 1: return "普通房间";
            case 2: return "洗衣房";
            case 3: return "活动中心";
            default: return "普通房间";
        }
    }
    
    // 判断是否为普通病房
    public boolean isWard() {
        return usageType != null && usageType == 1;
    }
    
    public RoomInfo(Integer id, String building, String roomNumber, Integer usageType, Integer floor) {
        super();
        this.id = id;
        this.building = building;
        this.roomNumber = roomNumber;
        this.usageType = usageType;
        this.floor = floor;
    }
    public RoomInfo() {
        super();
    }
    
    
}